package tienmanh.gs.goldminer.util;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

import tienmanh.gs.goldminer.manager.ResourcesManager;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class Item{
	public static String filename = "item";
	public static SharedPreferences sp;
	public static Editor edit;
	
	public static void init(){
		sp = ResourcesManager.getInstance().activity.getSharedPreferences(filename,0);
		edit = sp.edit();
	}
	//băng
	public static void writeItemSP1(long value){
	    edit.putLong("item1", value);
	    edit.commit();
	}
	public static long readItemSP1(){
	    return sp.getLong("item1", 0);
	}
	//thuốc nổ
	public static void writeItemSP2(long value){
	    edit.putLong("item2", value);
	    edit.commit();
	}
	public static long readItemSP2(){
	    return sp.getLong("item2", 0);
	}
//	đồng hồ
	public static void writeItemSP3(long value){
	    edit.putLong("item3", value);
	    edit.commit();
	}
	public static long readItemSP3(){
	    return sp.getLong("item3", 0);
	}
//	sức mạnh
	public static void writeItemSP4(long value){
	    edit.putLong("item4", value);
	    edit.commit();
	}
	public static long readItemSP4(){
	    return sp.getLong("item4", 0);
	}

	
}
